package cn.xhjava.crm.workbench.service.impl;

import cn.xhjava.crm.workbench.domain.ContactsRemark;
import cn.xhjava.crm.workbench.domain.CustomerRemark;
import cn.xhjava.crm.workbench.mapper.CustomerRemarkMapper;
import cn.xhjava.crm.workbench.service.CustomerRemarkService;
import com.sun.org.apache.regexp.internal.RE;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Xiahu
 * @create 2023/7/18 0018
 */
@Service
public class CustomerRemarkServiceImpl implements CustomerRemarkService {
    @Autowired
    private CustomerRemarkMapper customerRemarkMapper;

    @Override
    public List<CustomerRemark> selectDetailById(String id) throws Exception {
        return customerRemarkMapper.selectCustomerRemarkByCustomerId(id);
    }

    @Override
    public int add(CustomerRemark remark) throws Exception {
        return customerRemarkMapper.insert(remark);
    }

    @Override
    public int delete(String id) throws Exception {
        return customerRemarkMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int update(CustomerRemark remark) throws Exception {
        return customerRemarkMapper.updateByPrimaryKeySelective(remark);
    }


}
